
public class PrimaryExpr {
	String nm;
	String bl;
	String st;
	String id;
	CallExpr ce;
	String lp;
	Expression exp;
	String rp;
	
	public PrimaryExpr(String nm, String bl, String st, String id, CallExpr ce, String lp, Expression exp, String rp){
		this.nm = nm;
		this.bl = bl;
		this.st = st;
		this.id = id;
		this.ce = ce;
		this.lp = lp;
		this.exp = exp;
		this.rp = rp;
	}
	public String toString(){
		String ret = "";

		String s = "";
		if (nm != null)
			s+=nm;
		if (bl != null)
			s+=bl;
		if (st != null)
			s+=st;
		if (id != null)
			s+=id;
		if (ce != null) {
			s +=  ce.toString();
		}
		if (exp != null) {
			s +=  exp.toString();
		}
		
		return ret+s;
	}
	public void check() throws SemanticException {
		SymbolTable table = SymbolTable.getInstance();

		//System.out.println("PrimaryExpr " + nm + " " + bl + " " + st + " " + id + " " + lp + " " + rp);
		//System.out.println("tab eh tab ?");
		if (ce != null) {
			//System.out.println("PrimaryExpr 1");
			ce.check();
		}
		if (exp != null) {
			//System.out.println("PrimaryExpr 2");	
			exp.check();
		}
	}
}
